package com.fuhui.controller.manager;

import com.fuhui.dao.txm.PadConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("padManager")
public class SchoolPadConfigManage {

    @Autowired
    private PadConfigMapper padMapper;

    /**
     * 返回List类型
     *
     * @param schoolIds
     * @param name
     * @param type
     * @param status
     * @param pNum
     * @param pLine
     * @param isPage
     * @return
     */
    @RequestMapping("getList")
    public Object getList(Integer schoolIds, String name, Integer type, Integer status, Integer pNum, Integer pLine, Integer isPage) {
        if (isPage == 0 || isPage < 1) {
            pNum = null;
            pLine = null;
        } else {
            pNum = pNum - 1;
        }
        List list = padMapper.getList(schoolIds, name, type, status, pNum, pLine, isPage);
        System.out.println("list==" + list);
        return list;
    }

}
